home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / !applications! / azspell_2.02 / azspell.doc < prev    next >
Text File  |  1996-09-07  |  21KB  |  487 lines

  1.  
  2.  
  3.                                AZSPELL V2.02
  4.                                -------------
  5.  
  6.                          The Amiga spelling checker
  7.                          --------------------------
  8.  
  9.                                     by
  10.  
  11.                                Danny Hartley
  12.  
  13.                    Copyright © D.J.H.Hartley, 1990-1993.
  14.  
  15.  
  16.  
  17.    AZspell and AZmerge can be used and distributed freely, but they are not
  18.    public domain. The author retains copyright. They may not be sold for
  19.    profit, or included with any commercial product without prior permission
  20.    from the author. This document must be supplied with the programs and
  21.    must not be modified.
  22.  
  23.    AZdictionary is supplied `as is' for public domain, and may be modified
  24.    and redistributed in a modified form - no guarantee is expressed or
  25.    implied as to the correctness of the words contained in the file. 
  26.  
  27.  
  28.  
  29.    AZspell and AZmerge were written in 68000 assembly language using the
  30.    excellent HiSoft Devpac2 assembler.
  31.  
  32.  
  33.    Many thanks go to Dave Buckner of Glasgow, who added another 9000 words
  34.    to the dictionary and removed a lot of errors and spellings that aren't
  35.    used much this side of the Atlantic. He has also included both Scottish
  36.    and English versions where there's a difference, e.g. burgh and borough,
  37.    bailie and alderman.
  38.  
  39.  
  40.  
  41.    The files supplied are:
  42.  
  43.       AZspell.doc    -  The instructions (this file)
  44.       AZspell        -  The spelling checker program (V2.02)
  45.       AZmerge        -  The dictionary update program (V2.02)
  46.       AZassign       -  A script to assign AZspell:
  47.       AZconfig       -  A configuration file
  48.       AZdictionary   -  The dictionary
  49.  
  50.    and their associated icons (.info files)
  51.  
  52.  
  53.  
  54.    If you, like me, have great problems with spelling and/or your typing
  55.    fingers tend to hit every key except the one that your brain told
  56.    them to hit, then this is the program for you. A quick and simple to
  57.    use spelling checker.
  58.       All the files supplied have icons attached so that they may be
  59.    moved from volume to volume from the Workbench screen.
  60.  
  61.       When a document is checked, words that cannot be found in the
  62.    dictionary can be simply added to the dictionary so that they are
  63.    remembered for the next time. The program uses an intermediate file
  64.    called AZupdate to allow you to check the words, should you need to,
  65.    before committing them to the main dictionary. The intermediate file
  66.    also has several more uses (see AZmerge and AZspell:Special Mode).
  67.  
  68.  
  69.    V2.00 QUICK INFO
  70.    ----------------
  71.  
  72.    AZspell has been completely revamped for V2.00 although is still similar
  73.    to previous versions. Notable differences are the inclusion of a friendly
  74.    file requester, word character set definition via a configuration file
  75.    and of course WB2 style clicky bits.
  76.  
  77.  
  78.    Installing the speller
  79.    ----------------------
  80.  
  81.    For the speller to be most useful, that is, to allow words to be
  82.    added to the dictionary, it is best installing it onto a separate
  83.    disc. Installation is very simple.
  84.  
  85.       If you require the speller to be kept on its own disc, then format
  86.    a disc (initialize it), and rename it to AZspell. Once you have done that
  87.    then copy the files AZspell, AZmerge, AZconfig and AZdictionary onto the
  88.    disc (by dragging the icons from this drawer onto the new disc). As the
  89.    disc is called AZspell the program AZassign is not needed.
  90.  
  91.       If you require the speller to be in a drawer on part of a disc, as
  92.    you would for a hard disc, then create the drawer for it (dragging
  93.    Empty from a Workbench disc would do), and copy the files AZspell,
  94.    AZmerge, AZassign, AZconfig and AZdictionary into the drawer. AZassign
  95.    has to be in the same drawer that AZconfig and AZdictionary are in,
  96.    AZspell and AZmerge could in fact be anywhere you choose to place them
  97.    (except the bin!).
  98.  
  99.       If you use AZassign then you will also need the following
  100.    Workbench V1.3 (or V2.0) commands (in the C: directory) :
  101.  
  102.          Run, FailAt, Execute, CD, IconX, Assign and Echo.
  103.  
  104.  
  105.    AZassign
  106.    --------
  107.  
  108.    To allow maximum flexibility of speller configuration, i.e. where it
  109.    is - from its own separate floppy disc to a directory on a hard disc,
  110.    the speller uses a logical device name of "AZspell:" to store the
  111.    configuration, dictionary and update files on. If the speller resides on
  112.    its own disc with a volume name of AZspell then you can ignore this
  113.    program. If not then copy AZassign along with AZspell, AZmerge, AZconfig
  114.    and AZdictionary to the drawer where you wish the speller to be.
  115.       Whenever you need to use AZspell or AZmerge then run AZassign first
  116.    by double clicking on the AZassign icon. After AZassign has run then
  117.    whenever you run AZspell or AZmerge they will be able to find the
  118.    dictionary.
  119.  
  120.       NOTE: AZassign only has to be run once and of course after
  121.             the Amiga has been reset/turned off etc.
  122.  
  123.       AZassign will only work correctly if used from the Workbench. If
  124.    you are running the speller from the CLI/Shell then you will have to
  125.    assign AZspell: manually, e.g.:
  126.  
  127.          Assign AZspell: dh2:wp/speller
  128.  
  129.      Or CD to the directory and Execute AZassign from there.
  130.  
  131.  
  132.    AZspell
  133.    -------
  134.  
  135.    AZspell is the spelling checker program. To run it just double click
  136.    on its icon. Once it has loaded the dictionary, a file requester window
  137.    appears and prompts for a document name. The requester operates in a
  138.    similar manner to the ARP requester. Even if you're not familiar with ARP,
  139.    using the AZspell requester should be obvious. Just click on the name of
  140.    the file you require and click `OK'. Double clicking on the file provides
  141.    a short-cut. The right mouse button brings up a list of devices, volumes
  142.    and logical devices. Double clicking the right mouse has the same effect
  143.    as clicking `Cancel'.
  144.       Alternatively, AZspell and the file can be loaded by using Extended
  145.    Selection. Click once on the file's icon and while pressing the Shift key
  146.    double click on AZspell.
  147.       If the file could not be found or could not be loaded an error message
  148.    is displayed along with an AmigaDOS error code, to allow you decide what
  149.    exactly is wrong.
  150.  
  151.       The main part of the program is the checking window. It consists of
  152.    several sections.
  153.       The first section is the word statistics. It displays the number of
  154.    words in the dictionary and document (file). How many words have been
  155.    checked so far, how many were not found and how many are only used once.
  156.    Please note, to make the checker check words quickly and only stop at
  157.    words it cannot find, the last three stats are only refreshed whenever
  158.    the program has to wait for a response from the user (you).
  159.       Underneath the stats is a correction box that allows you to type in
  160.    a new word whenever a word cannot be found.
  161.       At the bottom is a line from the document with the current word being
  162.    checked highlighted in the centre.
  163.       On the right hand side is a suggestions box. When a word can't be found
  164.    then a list of thirty closest possible words is generated. The list takes
  165.    words from the dictionary (including words added) and any from the words
  166.    ignored (they are remembered). This process may take several seconds to
  167.    complete. When the list has been compiled the words are listed in order
  168.    from the closest word at the top. To move the list up and down use `Up'
  169.    and `Do' respectively. Usually the word you are looking for will be in the
  170.    top few. If you wish to use one of the words from the list of suggestions
  171.    then just click on the word. It will then be copied into the correction
  172.    box, to allow it to be used for correction.
  173.       A valid word (one that will be checked) is defined as a character or
  174.    sequence of characters, the initial character must be alphabetic, the
  175.    remaining characters can be alphabetic, an apostrophe or a hyphen except
  176.    the final character which must only be alphabetic.
  177.       This definition, however, can be changed by modifying the configuration
  178.    file. The creation of the configuration file and its uses is fully
  179.    described in the section AZconfig.
  180.       Anything that is not a valid word is not checked by the program.
  181.       The final section is the four boxes in the middle. These instruct the
  182.    program what to do when it can't find a word.
  183.  
  184.       Add to dictionary - If the highlighted word in the document is not
  185.                           already in the dictionary then it will be added
  186.                           to the dictionary (via AZupdate).
  187.  
  188.       Ignore word       - Ignores the highlighted word but remembers it.
  189.                           If you ignore a word then any further occurrences
  190.                           of the word will also be ignored.
  191.  
  192.       Correct word      - Corrects the word with the word(s)/characters in
  193.                           the correction box. If the correction box contains
  194.                           a single valid word that is not already in the 
  195.                           dictionary then it will be remembered.
  196.  
  197.                           Correct word also has another mode. If the
  198.                           correction box is empty then the word will be
  199.                           completely ignored and not remembered.
  200.  
  201.       Correct and Add   - As Correct word but the correction box must only
  202.                           contain a single valid word. If the word is not
  203.                           already in the dictionary then it will be added
  204.                           to the dictionary (via AZupdate).
  205.  
  206.       The spelling checker can be stopped before all the words have been
  207.    checked by clicking on the close gadget.
  208.  
  209.       When all the words have been checked (or you have stopped the speller
  210.    part way through) and words in the document have been corrected then the
  211.    file requester appears asking you for the name to save the document under.
  212.       If words have been added to the dictionary then the words are saved
  213.    to the file AZspell:AZupdate.
  214.       If you click on `Cancel' when asked for the name to save the document
  215.    as, then the document save AND the AZupdate save will both be aborted.
  216.  
  217.    Special Mode
  218.  
  219.    AZspell has a special mode that allows the automatic collection of
  220.    misspelled/not found words in a document. This mode is only available
  221.    from the CLI/Shell as normally the machine would be left unattended,
  222.    controlled from a script. The command line format is:
  223.  
  224.          AZSPELL [<file> [!]]
  225.  
  226.       If the file name <file> is not specified then AZspell behaves as
  227.    normal just as if you had run it from the Workbench. If <file> is given
  228.    then it is loaded but otherwise nothing different. If a ! is given after
  229.    the file name, then the file is loaded, the checking window appears, but
  230.    if a word can't be found then it is automatically added to the dictionary
  231.    just as if you had clicked in the `Add to dictionary' box. When AZspell
  232.    has finished the file AZupdate can be examined to find any suitable words
  233.    to add to the dictionary. In this way a large and thorough dictionary can
  234.    be easily built up.
  235.  
  236.       If you do use this on a lot of documents and leave your Amiga running
  237.    while you watch Neighbours, then the script below should provide a
  238.    suitable starting point.
  239.  
  240.            echo >ram:fried_egg "** file1 **"
  241.            azspell file1 !
  242.            join ram:fried_egg azspell:azupdate to ram:spam
  243.            echo >>ram:spam "** file2 **"
  244.            azspell file2 !
  245.            join ram:spam azspell:azupdate to ram:fried_egg
  246.            echo >>ram:fried_egg "** file3 **"
  247.            azspell file3 !
  248.            join ram:fried_egg azspell:azupdate to ram:spam
  249.  
  250.       and so on...
  251.  
  252.  
  253.    AZmerge
  254.    -------
  255.  
  256.    This program merges the words in AZupdate with the main dictionary
  257.    AZdictionary. After checking a document and you are sure that the words
  258.    that you have added to the dictionary (using Add to dictionary/Correct
  259.    and Add) are all correct then run this program by double clicking on
  260.    its icon or from the CLI/Shell. A window will appear to inform you
  261.    that it is running.
  262.  
  263.       If you wish to add many words to the dictionary and don't want to
  264.    go through AZspell clicking `Add to dictionary' all the time, then
  265.    using your favourite text editor, create a file of words and save it
  266.    as AZspell:AZupdate. There must only one word per line, each word
  267.    conforming to the previously mentioned definition of a word. The case
  268.    is unimportant unless the case sensitive option is used and the file
  269.    does not need to be sorted.
  270.       Once AZupdate has been created then run AZmerge. Any words that are
  271.    already in the dictionary will be ignored, similarly if a word occurs
  272.    two or more times then only one occurrence will be used. This feature
  273.    could be used to join another dictionary with the main one.
  274.  
  275.       AZmerge V2.00 has been extensively re-engineered and consequently is
  276.    considerably faster than its predecessors.
  277.  
  278.  
  279.    AZconfig
  280.    --------
  281.  
  282.    A new addition with AZspell V2.00 is the ability for the user to set up
  283.    the speller with particular preferences. This was available on AZspell
  284.    V1.1x to a degree but not as definitive.
  285.       The configuration is defined as a set of commands in a text file
  286.    AZspell:AZconfig. This configuration file is used by both AZspell and
  287.    AZmerge. Each command consists of a single character command word in
  288.    the FIRST COLUMN of a line. The case of the character is important.
  289.  
  290.       If AZconfig does not exist, AZspell and AZmerge revert to a default
  291.    setting suitable for English. If this is all you require then you can
  292.    delete AZconfig. There is no speed penalty for using or not using
  293.    AZconfig other than time required to load it from disc.
  294.  
  295.       The default setting of AZspell and AZmerge is:
  296.    
  297.          G 2
  298.          H ABCDEFGHIJKLMNOPQRSTUVWXYZ
  299.          M ABCDEFGHIJKLMNOPQRSTUVWXYZ-'
  300.          T ABCDEFGHIJKLMNOPQRSTUVWXYZ
  301.  
  302.  
  303.    G COMMAND
  304.  
  305.    A G command defines the graphics/gadgets style. Its purpose is to modify
  306.    the look of AZspell depending upon your mood etc. Currently four styles
  307.    are available:
  308.  
  309.          0 : Traditional olde-Workbenche gadgets
  310.          1 : As 0 but word highlight is modified for working in 2-colours
  311.          2 : Bas-relief graphics for usual WB1.x palette (default)
  312.          3 : Bas-relief graphics for usual WB2.0 palette
  313.  
  314.       The format of the command is:
  315.  
  316.          G <style>
  317.  
  318.       Where <style> is one of the above numbers. It can occur anyway in the
  319.    config file but only the first occurrence will have the effect.
  320.  
  321.  
  322.    H,M AND T COMMANDS
  323.  
  324.    These commands define the valid characters for Head, Middle and Tail
  325.    character sets respectively.
  326.       The format of the commands are:
  327.  
  328.          H {<ch>}
  329.          M {<ch>}
  330.          T {<ch>}
  331.  
  332.       Where <ch> is a character and {..} means zero or more. They may occur
  333.    anywhere (but see the C command) and in any order. If there are several
  334.    occurrences of a command it will have the effect of adding to the
  335.    previously defined sets. They will not reset or undo any previous
  336.    definition. The order and case of any alphabetic characters used, whether
  337.    A-Z or any of the international characters is unimportant (but see C
  338.    command), i.e.:
  339.  
  340.          H ABCDEFGHIJKLMNOPQRSTUVWXYZ
  341.  
  342.       Is the same as:
  343.  
  344.          H TheQuickBrownFoxJumpsOverTheLazyDog
  345.  
  346.       AZspell knows about upper case and lower case letters used by foreign
  347.    (not English) languages. For example, a definition for Norwegian is:
  348.  
  349.          H ABCDEFGHIJKLMNOPQRSTUVWXYZÆÅØ
  350.          M ABCDEFGHIJKLMNOPQRSTUVWXYZ-'ÆÅØ
  351.          T ABCDEFGHIJKLMNOPQRSTUVWXYZÆÅØ
  352.  
  353.       Don't forget to distribute AZconfig with AZdictionary if distributing
  354.    a dictionary that doesn't use the default setting for AZspell.
  355.  
  356.       Note: the default setting is different to pre-V2.00 versions. The
  357.    hyphen and apostrophe are now not allowed to form ends of words. If you
  358.    find that your pre-V2.00 dictionary is now incompatible either change
  359.    AZconfig to the definition below or delete the offending lines from the
  360.    dictionary - AZspell will tell you where the errors are.
  361.  
  362.       The equivalent pre-V2.00 AZspell setting is:
  363.  
  364.          H ABCDEFGHIJKLMNOPQRSTUVWXYZ
  365.          M ABCDEFGHIJKLMNOPQRSTUVWXYZ-'
  366.          T ABCDEFGHIJKLMNOPQRSTUVWXYZ-'
  367.  
  368.       For those of you with unusual spelling requirements, the character
  369.    set definition will allow any ASCII character, even control codes, with
  370.    exceptions being ^@ ($00), ^A ($01) and ^J ($0A). In the past, people
  371.    have asked for a speller to check their BASIC programs, where a single
  372.    misspelled variable is hard to find as variables don't require declaring
  373.    in BASIC. AZconfig will allow definition of a variable name followed by
  374.    %, $, # etc. or a letter followed by zero or more letters or numbers.
  375.    You get the picture. AZdictionary would contain the keywords of the
  376.    language e.g. PRINT, GOTO etc. A working copy of AZdictionary can then
  377.    be used for storing variable names etc. while the program is being
  378.    developed.
  379.       If you require a space to be part of a valid word (!) then delimit
  380.    the letters by double quotes, e.g.:
  381.  
  382.          M " ABC*"**"
  383.  
  384.       defines a middle letter as a space,A,B,C,a,b,c," or *.
  385.  
  386.       Finally, how these definitions are used by AZspell to determine a
  387.    valid word.
  388.       A word must start with a character from the Head set. It may then
  389.    contain zero or more characters from the Middle set and may terminate
  390.    with a character from the Tail set. Depending upon your definitions of
  391.    the sets, if, after finding a head character, the speller finds a
  392.    character that is not in the Middle set nor in the Tail set, then it will
  393.    backtrack through the word until it finds a character that is in the
  394.    Tail set, in which case this will be the end of the word, or reaches the
  395.    character used as the head of the word, in which just only the head
  396.    character will form the word.
  397.  
  398.       Note if AZconfig is used then character set definitions are expected.
  399.    That is, if you use AZconfig then these three commands should be used to
  400.    explicitly define the character set you require.
  401.  
  402.  
  403.    E COMMAND
  404.  
  405.    The E command defines the a set of characters that are, ASCII wise,
  406.    different but are to be treated as equivalents. The speller uses this
  407.    information to provide an improved list of possible suggestions.
  408.       The format of the command is:
  409.  
  410.          E {<ch>}
  411.  
  412.       Where <ch> is a character and {..} means zero or more. The command may
  413.    occur anywhere (but see the C command). A complete set is defined using a
  414.    single command. Once a character belongs to an equivalent set then cannot
  415.    be used for another equivalent set. The order and case of any alphabetic
  416.    characters used, whether A-Z or any of the international characters is
  417.    unimportant (but see C command). Example:
  418.  
  419.          E AÁÀÄ
  420.  
  421.       defines an equivalent set containing A,a,Á,á,À,à,Ä and ä.
  422.  
  423.  
  424.    COMMENTS
  425.  
  426.    Comment lines may be introduced by an asterisk in the first column.
  427.    The remainder of the line is then ignored. Also blank lines are skipped.
  428.  
  429.          *comments are jolly useful things
  430.  
  431.  
  432.    C COMMAND
  433.  
  434.    A C command defines that the dictionary and all spell checking is case
  435.    sensitive (for checking C programs?).
  436.       The format of the command is:
  437.  
  438.          C
  439.  
  440.       The position of the command is important. If a H,M,T or E command
  441.    occurs before the C then the checking, using that set of letters, includes
  442.    both upper case and lower case. Any H,M,T or E after the C will check
  443.    letters using the case of each letter specified in the command. Experiment
  444.    if it is a bit cloudy.
  445.  
  446.  
  447.    AZdictionary
  448.    ------------
  449.  
  450.    This is the actual dictionary that AZspell uses to determine if a
  451.    word is correct or not, or isn't in the dictionary. The dictionary has 
  452.    currently about 22000 words which is hardly the whole English language
  453.    but does contain the most used words, so should be good for most of the
  454.    time unless you use very exotic words a lot. I should like to point out
  455.    that even though I have personally checked the whole dictionary, a task
  456.    only slightly more interesting than watching paint dry, the odd word or
  457.    two may have slipped past my bleary eyes, so I make no claim that the
  458.    dictionary is 100% correct.
  459.  
  460.                         **  YOU HAVE BEEN WARNED  **
  461.    
  462.       You should always have a dictionary close to hand in any case.
  463.  
  464.       The dictionary is purely a simple text file, and can be viewed (and
  465.    edited) with any text editor. All the words conform to the previously
  466.    mentioned definition of a word. They are all in upper case (unless the
  467.    case sensitive option is used) with one word per line and in strict
  468.    ASCII ascending order. If you decide to edit the dictionary then ensure
  469.    that the above is still true, particularly ensure there are no empty
  470.    lines, especially at the end of the file.
  471.  
  472.  
  473.  
  474.  
  475.    Any queries, suggestions, spare cash, beer, etc. to:
  476.  
  477.      Danny Hartley
  478.      1 Alexandra Drive
  479.      Prestatyn
  480.      Clwyd
  481.      LL19 8BW
  482.      U.K.
  483.  
  484.  
  485.  
  486.  
  487.